import lombok.Data;
import org.hyperledger.fabric.contract.annotation.DataType;
import org.hyperledger.fabric.contract.annotation.Property;

@DataType
@Data
public class TransactionInfo {

    @Property
    String owner;   // NFT卖方(持有者)
    @Property
    String buyer;   // NFT买方
    @Property
    NFTInfo NFT; // NFTid
    @Property
    String price;    //卖方确定的价格
    @Property
    String time;     //交易时间

    public TransactionInfo(String owner, String buyer, NFTInfo NFT, String price, String time) {
        this.owner = owner;
        this.buyer = buyer;
        this.NFT = NFT;
        this.price = price;
        this.time = time;
    }

    public TransactionInfo() {
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getBuyer() {
        return buyer;
    }

    public void setBuyer(String buyer) {
        this.buyer = buyer;
    }

    public NFTInfo getNFT() {
        return NFT;
    }

    public void setNFT(NFTInfo NFT) {
        this.NFT = NFT;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }
}
